﻿using System;
using Argos.Data.Model;
using Argos.WorkflowServices;
using System.Collections.Generic;
using Argos.Scheduling;

namespace Argos.Workflows
{
	/// <summary>
	/// This interface must be implemented by any workflow that is used
	/// to monitor a target.
	/// </summary>
	public interface ITargetMonitoringWorkflow
	{

		/// <summary>
		/// When implemented in a class, sets or returns a list of schedules that
		/// define when a target is active, i.e. when it is being monitored. A
		/// target is only monitored if one of the schedules in this list returns
		/// a current occurrence.
		/// </summary>
		/// <remarks>
		/// If this property returns null or an empty list, the target is assumed
		/// not to be monitored, i.e. the target is never monitored.
		/// </remarks>
		List<Schedule> ActiveSchedules { get; set; }

		/// <summary>
		/// When implemented in a class, sets or returns a list of schedules that
		/// define breaks for the target the current monitoring workflow is
		/// monitoring. During a break, monitoring is not performed for the
		/// target.
		/// </summary>
		/// <remarks>
		/// If this property returns null or an empty list, the target is assumed
		/// to have no scheduled breaks in monitoring.
		/// </remarks>
		List<Schedule> BreakSchedules { get; set; }

		/// <summary>
		/// When implemented in a class, sets or returns whether the target is
		/// currently disabled.
		/// </summary>
		bool TargetDisabled { get; set; }

		/// <summary>
		/// When implemented in a class, sets or returns the id of the target
		/// that the workflow is monitoring.
		/// </summary>
		Guid TargetId { get; set; }

		/// <summary>
		/// When implemented in a class, sets or returns the interval between
		/// tests for the current target.
		/// </summary>
		TimeSpan TestInterval { get; set; }

	}
}
